import '../custom_provider/my_change_notifier.dart';

class AddNumViewModel extends MyChangeNotifier {
  int count = 1;
  bool _update = true;

  void addNum(int num) {
    count += num;
    _update = true;
    notifyListeners();
  }

  @override
  bool shouldNotify<T extends MyChangeNotifier>(T t) {
    bool update = _update;
    _update = false;
    return update;
  }
}
